\hypertarget{class_enemy_ship}{
\section{EnemyShip Class Reference}
\label{class_enemy_ship}\index{EnemyShip@{EnemyShip}}
}


{\ttfamily \#include $<$enemyShip.h$>$}Inheritance diagram for EnemyShip::\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=2cm]{class_enemy_ship}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{class_enemy_ship_a786aafea29d674b7b3453a2a24f1d11c}{EnemyShip} ()
\item 
\hyperlink{class_enemy_ship_a1ac35529a92de9465e7d0a65c7060220}{$\sim$EnemyShip} ()
\item 
QRectF \hyperlink{class_enemy_ship_a686ecac9600cf96356853ecda872ded0}{boundingRect} () const 
\item 
void \hyperlink{class_enemy_ship_acdd59ef427b1f6919dc6bb32ff45bdc6}{paint} (QPainter $\ast$painter, const QStyleOptionGraphicsItem $\ast$option, QWidget $\ast$widget=0)
\end{DoxyCompactItemize}
\subsection*{Private Attributes}
\begin{DoxyCompactItemize}
\item 
QTimeLine $\ast$ \hyperlink{class_enemy_ship_aef8e031f014691c7c6cc66864d505f45}{timeline}
\end{DoxyCompactItemize}


\subsection{Detailed Description}


Definition at line 60 of file enemyShip.h.

\subsection{Constructor \& Destructor Documentation}
\hypertarget{class_enemy_ship_a786aafea29d674b7b3453a2a24f1d11c}{
\index{EnemyShip@{EnemyShip}!EnemyShip@{EnemyShip}}
\index{EnemyShip@{EnemyShip}!EnemyShip@{EnemyShip}}
\subsubsection[{EnemyShip}]{\setlength{\rightskip}{0pt plus 5cm}EnemyShip::EnemyShip ()}}
\label{class_enemy_ship_a786aafea29d674b7b3453a2a24f1d11c}


Definition at line 177 of file enemyShip.cpp.


\begin{DoxyCode}
178 {
179     QGraphicsItem *spaceshipTail = new EnemyShipTail(this);
180     QGraphicsItem *oneWing = new EnemyShipWing1(this);
181     QGraphicsItem *secondWing = new EnemyShipWing2(this);
182     QGraphicsItem *spaceshipBody = new EnemyShipBody(this);
183     QGraphicsItem *spaceshipWindow = new EnemyShipWindow(this);
184 
185     spaceshipTail->setPos(602, 293);
186     oneWing->setPos(565, 310);
187     secondWing->setPos(623, 310);
188     spaceshipBody->setPos(600, 300);
189     spaceshipWindow->setPos(607, 332);
190 
191     timeline = new QTimeLine;
192 
193     QGraphicsItemAnimation *tailAnim = new QGraphicsItemAnimation;
194     tailAnim->setItem(spaceshipTail);
195     tailAnim->setTimeLine(timeline);
196     tailAnim->setTranslationAt(0, 20, 0);
197     tailAnim->setTranslationAt(1, -20, 0);
198 
199     QGraphicsItemAnimation *oneWingAnim = new QGraphicsItemAnimation;
200     oneWingAnim->setItem(oneWing);
201     oneWingAnim->setTimeLine(timeline);
202     oneWingAnim->setTranslationAt(0, 20, 0);
203     oneWingAnim->setTranslationAt(1, -20, 0);
204 
205     QGraphicsItemAnimation *secondWingAnim = new QGraphicsItemAnimation;
206     secondWingAnim->setItem(secondWing);
207     secondWingAnim->setTimeLine(timeline);
208     secondWingAnim->setTranslationAt(0, 20, 0);
209     secondWingAnim->setTranslationAt(1, -20, 0);
210 
211     QGraphicsItemAnimation *bodyAnim = new QGraphicsItemAnimation;
212     bodyAnim->setItem(spaceshipBody);
213     bodyAnim->setTimeLine(timeline);
214     bodyAnim->setTranslationAt(0, 20, 0);
215     bodyAnim->setTranslationAt(1, -20, 0);
216 
217     QGraphicsItemAnimation *windowAnim = new QGraphicsItemAnimation;
218     windowAnim->setItem(spaceshipWindow);
219     windowAnim->setTimeLine(timeline);
220     windowAnim->setTranslationAt(0, 20, 0);
221     windowAnim->setTranslationAt(1, -20, 0);
222 
223     timeline->setUpdateInterval(1000/25);
224     timeline->setCurveShape(QTimeLine::SineCurve);
225     timeline->setLoopCount(0);
226     timeline->setDuration(2000);
227     timeline->start();
228 
229 }
\end{DoxyCode}
\hypertarget{class_enemy_ship_a1ac35529a92de9465e7d0a65c7060220}{
\index{EnemyShip@{EnemyShip}!$\sim$EnemyShip@{$\sim$EnemyShip}}
\index{$\sim$EnemyShip@{$\sim$EnemyShip}!EnemyShip@{EnemyShip}}
\subsubsection[{$\sim$EnemyShip}]{\setlength{\rightskip}{0pt plus 5cm}EnemyShip::$\sim$EnemyShip ()}}
\label{class_enemy_ship_a1ac35529a92de9465e7d0a65c7060220}


Definition at line 231 of file enemyShip.cpp.


\begin{DoxyCode}
232 {
233     delete timeline;
234 }
\end{DoxyCode}


\subsection{Member Function Documentation}
\hypertarget{class_enemy_ship_a686ecac9600cf96356853ecda872ded0}{
\index{EnemyShip@{EnemyShip}!boundingRect@{boundingRect}}
\index{boundingRect@{boundingRect}!EnemyShip@{EnemyShip}}
\subsubsection[{boundingRect}]{\setlength{\rightskip}{0pt plus 5cm}QRectF EnemyShip::boundingRect () const}}
\label{class_enemy_ship_a686ecac9600cf96356853ecda872ded0}


Definition at line 236 of file enemyShip.cpp.


\begin{DoxyCode}
237 {
238     return QRectF();
239 }
\end{DoxyCode}
\hypertarget{class_enemy_ship_acdd59ef427b1f6919dc6bb32ff45bdc6}{
\index{EnemyShip@{EnemyShip}!paint@{paint}}
\index{paint@{paint}!EnemyShip@{EnemyShip}}
\subsubsection[{paint}]{\setlength{\rightskip}{0pt plus 5cm}void EnemyShip::paint (QPainter $\ast$ {\em painter}, \/  const QStyleOptionGraphicsItem $\ast$ {\em option}, \/  QWidget $\ast$ {\em widget} = {\ttfamily 0})}}
\label{class_enemy_ship_acdd59ef427b1f6919dc6bb32ff45bdc6}


Definition at line 241 of file enemyShip.cpp.


\begin{DoxyCode}
243 {
244     Q_UNUSED(painter);
245     Q_UNUSED(option);
246     Q_UNUSED(widget);
247 }
\end{DoxyCode}


\subsection{Member Data Documentation}
\hypertarget{class_enemy_ship_aef8e031f014691c7c6cc66864d505f45}{
\index{EnemyShip@{EnemyShip}!timeline@{timeline}}
\index{timeline@{timeline}!EnemyShip@{EnemyShip}}
\subsubsection[{timeline}]{\setlength{\rightskip}{0pt plus 5cm}QTimeLine$\ast$ {\bf EnemyShip::timeline}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{class_enemy_ship_aef8e031f014691c7c6cc66864d505f45}


Definition at line 68 of file enemyShip.h.

The documentation for this class was generated from the following files:\begin{DoxyCompactItemize}
\item 
C:/Users/Kohli/Desktop/Earth-\/20000/\hyperlink{enemy_ship_8h}{enemyShip.h}\item 
C:/Users/Kohli/Desktop/Earth-\/20000/\hyperlink{enemy_ship_8cpp}{enemyShip.cpp}\end{DoxyCompactItemize}
